function [highrange,lowrange]=findrange(letters,possiblef,letter,highs,lows)
    coderange=highs-lows;
    indexs=find(letters==letter);
    highrange=lows+coderange*possiblef(indexs);
    if indexs>1
        lowrange=lows+possiblef(indexs-1)*coderange;
    else
        lowrange=lows;
    end
end